<?php

namespace App\Http\Controllers\Home;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use DB;
class NoticeController extends Controller
{
    
    public function index()
    {
    	$date = DB::table('notice') ->select() ->get();

    	if(empty($id)){$id=2;};
    	$lianjie = DB::table('notice') -> where('id',$id) -> first() -> Noticetext;;
    	return view('home.notice.index',['title'=>'关于我们','date'=>$date,'lianjie'=>$lianjie]);
    }

    public function lianjie($id)
    {
    	$date = DB::table('notice') ->select() ->get();
    	$lianjie = DB::table('notice') -> where('id',$id) -> first() -> Noticetext;
    	
    	// dd($lianjie);
    	return view('home.notice.index',['title'=>'关于我们','date'=>$date,'lianjie'=>$lianjie]);
    }



    
}
